<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="${agent.agentName} + ' - YUMO.AI'"></title>
    <link rel="icon" href="https://witmore.oss-cn-hangzhou.aliyuncs.com/agent/favicon.ico">
    <link rel="stylesheet"
          href="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/element-ui/2.15.14/lib/theme-chalk/index.css">
    <link href="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/font-awesome/6.4.0/all.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/common.css">
    <link rel="stylesheet" href="/css/robot-detail/main.css">
    <link rel="stylesheet" href="/css/robot-detail/config.css">
    <link rel="stylesheet" href="/css/robot-detail/preview.css">
    <link rel="stylesheet" href="/css/robot-detail/publish.css">
    <link rel="stylesheet" href="/css/plugin-group.css">
    <link rel="stylesheet" href="/css/plugin-group-config.css">
    <script src="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/tailwindcss/3.4.16/tailwindcss.min.js"></script>
    <script src="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/vue/2.6.14/vue.min.js"></script>
    <script src="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/element-ui/2.15.14/index.js"></script>
    <script src="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/marked/15.0.12/marked.min.js"></script>
    <script src="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/purify/3.2.6/purify.min.js"></script>
    <script src="/js/vconsole.js"></script>
    <script src="/js/common.js"></script>
    <script th:inline="javascript">
        var agent = /*[[${agent}]]*/ {};
        // console.log('agent->', agent)
        var modelList =  /*[[${modelList}]]*/ [];
        var modelGroupList = es5_groupModelsByType(modelList)
        // console.log('modelGroupList->', modelGroupList)
        var publishList = /*[[${publishList}]]*/ [];
        // console.log('publishList->', publishList)
        var chat_source = 'platform'
        var apiConfig = /*[[${apiConfig}]]*/ {};
        var aiConfig = {};
        // console.log('apiConfig->', apiConfig)
    </script>
    <script src="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/Pxmu.js/1.1.0/pxmu.min.js"></script>
    <script src="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/axios/0.19.0/axios.min.js"></script>
    <script src="https://witmore.oss-cn-hangzhou.aliyuncs.com/cdn/npm/dayjs/1.8.15/dayjs.min.js"></script>
    <script th:src="@{/js/request.js}"></script>
    <script th:src="@{/js/fetch_es5.js}"></script>
    <script th:src="@{/js/api_robot.js}"></script>
    <script th:src="@{/js/api_plugin_group.js}"></script>
</head>
<body>
<div class="robot-detail">

    <th:block th:replace="~{fragments/header::header}"></th:block>

    <div class="detail-container">
        <div class="sidebar-header">
            <a th:href="@{../../dashboard}" class="back-button">
                <i class="fas fa-arrow-left"></i>
            </a>
            <h2 class="robot-title">机器人详情</h2>
        </div>

        <div class="main-content">
            <!-- 左侧导航栏 -->
            <th:block th:replace="~{fragments/robot-detail/sidebar::sidebar}"></th:block>

            <!-- 配置与预览区域 -->
            <div class="basic-container sidebar-content" id="basicInfo">
                <!-- 配置区域 -->
                <th:block th:replace="~{fragments/robot-detail/config::config}"></th:block>
                <!-- 实时预览区域 -->
                <th:block th:replace="~{fragments/robot-detail/preview::preview}"></th:block>
            </div>

            <!-- 服务发布区域 -->
            <div class="publish-container sidebar-content hidden" id="serverPublish">
                <!-- 服务集成 -->
                <th:block th:replace="~{fragments/robot-detail/publish::publish}"></th:block>
            </div>

        </div>
    </div>
</div>
<script th:src="@{/js/robot-detail.js}"></script>
</body>
</html>